package com.lin.controller.Client;

import com.lin.mapper.FormMapper;
import com.lin.pojo.Form;
import com.lin.response.CommonResp;
import com.lin.service.FormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/client/form")
public class FormController {
    @Autowired
    private FormService formService;

    @GetMapping("/select")
    public CommonResp page(@RequestParam Integer pageNum, @RequestParam Integer pageSize, @RequestParam String username){
        return formService.page(pageNum,pageSize,username);
    }

    @PostMapping("/cancel")
    public CommonResp cancel(@RequestBody Form form){
//        System.out.println("form**" + form);
        return formService.cancel(form);
    }


}
